package dome;

import java.util.ArrayList;

public class Database {
    private ArrayList<Item> listItem = new ArrayList<Item>();

    public void add(Item i) {
        listItem.add(i);
    }

    public void list() {
        for (Item i : listItem) {
            i.print();
        }
    }

    public static void main(String[] args) {
        Database db = new Database();
        db.add(new CD("舞娘", "蔡依林", 5, 543, false, ""));
        db.add(new CD("范特西", "周杰伦", 5, 543, false, ""));
        db.list();
    }

}
